<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<style>
.cot1 {
	width: 150px;
	vertical-align: middle;
	display: inline-block;
	display: table-cell;
	padding: 9px 0px;
}

.cot2 {
	width: 180px;
}
</style>
<script type="text/javascript">
	function dt2() {
		document.getElementById("dt1").style.display = "none";
		document.getElementById("dt2").style.display = "inline";
		document.getElementById("bt1").style.font = "normal 100% arial";
		document.getElementById("bt2").style.font = "bold 100% arial";
	}
	function dt1() {
		document.getElementById("dt2").style.display = "none";
		document.getElementById("dt1").style.display = "inline";
		document.getElementById("bt2").style.font = "normal 100% arial";
		document.getElementById("bt1").style.font = "bold 100% arial";
	}
</script>
<form:form method="post" path="Organization"
	action="addorganization.html" commandName="organization" name="test">
	<ul class="menutren"
		style="clear: both; float: left; width: 100%; border-bottom: 1px solid #ccc; margin-bottom: 20px; font-weight: bold">
		<div class="trai" onclick="dt1();">
			<input type="button" style="font: bold 100% arial" id="bt1"
				value="Detail 1" />
		</div>
		<div onclick="dt2();" class="trai">
			<input type="button" style="font: normal 100% arial" id="bt2"
				value="Detail 2" />
		</div>
		<a href="organization"><input class="phai" type="button"
			value="Back" /> </a>
		<input class="phai" type="submit" value="Save" />
	</ul>
	<div id="dt1">
		<ul style="width: 380px; float: left; margin-right: 20px"
			class="formnhap">
			<li><div class="cot1">
					<spring:message code="organisation.name" />
					<font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:input type="text" path="name" />
					<form:errors style="color:red" path="name" />
				</div>
			</li>
			<li><div class="cot1">
					Organisation Short Description <font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:textarea type="text" path="description" rows="5"></form:textarea>
					<form:errors style="color:red" path="description" />
				</div>
			</li>
			<li><div class="cot1">Lead contact</div>
				<div class="cot2">
					<form:input style="width:80px" type="text" id="leadcontact"
						path="leadcontact" />
					<input style="width: 0px; display: none" type="text"
						id="leadcontactid" /> <a href="contact"
						onClick="return openPopup(this, 'contact lookup');">Lookup</a>
				</div>
			</li>
			<li><div class="cot1">
					Address <font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:input type="text" path="address.address1" />
					<form:input type="hidden" id="addressid" path="address.id" />
					<form:errors style="color:red" path="address.address1" />
				</div>
			</li>
			<li><div class="cot1">Address 2</div>
				<div class="cot2">
					<form:input type="text" path="address.address2" />
				</div>
			</li>
			<li><div class="cot1">Address 3</div>
				<div class="cot2">
					<form:input type="text" path="address.address3" />
				</div>
			</li>
			<li><div class="cot1">
					Post Code <font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:input style="width:80px" id="postcode" type="text" path="address.postcode" />
					<a href="address"
						onClick="return openPopup(this, 'contact lookup');">Lookup</a>
					<form:errors style="color:red" path="address.postcode" />
				</div>
			</li>
			<li><div class="cot1">Town/City</div>
				<div class="cot2">
					<form:select id="townid" path="address.town.id">
						<c:forEach items="${townList}" var="town">
							<option value="${town.id}">${town.townName}</option>
						</c:forEach>
					</form:select>
				</div>
			</li>
			<li><div class="cot1">County</div>
				<div class="cot2">
					<select id="countyid">
						<c:forEach items="${countyList}" var="county">
							<option value="${county.id}">${county.countyName}</option>
						</c:forEach>
					</select>
				</div>
			</li>
			<li><div class="cot1">Nation / Country</div>
				<div class="cot2">
					<%-- <form:input type="text" path="country" /> --%>
				</div>
			</li>
		</ul>

		<ul style="width: 380px; float: left" class="formnhap">
			<li><div class="cot1" style="width: 250px;">Reffered
					Organisation</div>
				<div class="cot2" style="width: 50px">
					<form:input path="reff" value="yes" type="checkbox" />
				</div>
			</li>
			<li><div class="cot1" style="width: 250px;">Expression of
					Interest</div>
				<div class="cot2" style="width: 50px">
					<form:input path="exp" value="yes" type="checkbox" />
				</div>
			</li>
			<li><div class="cot1">
					Type of Business <font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:input style="width:80px" type="text" path="typeofbusiness" />
					<a href="business"
						onClick="return openPopup(this, 'contact lookup');">Lookup</a>
					<form:errors style="color:red" path="typeofbusiness" />
				</div>
			</li>
			<li><div class="cot1">SIC Code</div>
				<div class="cot2">
					<form:input type="text" path="siccode" />
				</div>
			</li>
			<li><div class="cot1">Organisation Full Description</div>
				<div class="cot2">
					<form:textarea type="text" path="descriptionfull" rows="5"></form:textarea>
				</div>
			</li>
			<li><div class="cot1">
					Phone number <font color="red">(*)</font>
				</div>
				<div class="cot2">
					<form:input type="text" path="phone" />
					<form:errors style="color:red" path="phone" />
				</div>
			</li>
			<li><div class="cot1">Fax</div>
				<div class="cot2">
					<form:input type="text" path="fax" />
				</div>
			</li>
			<li><div class="cot1">Email</div>
				<div class="cot2">
					<form:input type="text" path="email" />
				</div>
			</li>
			<li><div class="cot1">Web Address</div>
				<div class="cot2">
					<form:input type="text" path="website" />
				</div>
			</li>
			<li><div class="cot1">Charity Number</div>
				<div class="cot2">
					<form:input type="text" path="charity" />
				</div>
			</li>
			<li><div class="cot1">Company Number</div>
				<div class="cot2">
					<form:input type="text" path="company" />
				</div>
			</li>
		</ul>
	</div>
	<div id="dt2" style="display: none">heheh</div>
</form:form>
